using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ImageAnalystTools._MapAlgebra
{
    /// <summary>
    /// <para>Raster Calculator</para>
    /// <para>Builds and executes a single Map Algebra expression using Python syntax.</para>
    /// <para>使用 Python 语法构建并执行单个地图代数表达式。</para>
    /// </summary>    
    [DisplayName("Raster Calculator")]
    public class RasterCalculator : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RasterCalculator()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_expression">
        /// <para>Map Algebra expression</para>
        /// <para><xdoc>
        ///   <para>The Map Algebra expression you want to run.</para>
        ///   <para>The expression is composed by specifying the inputs, values, operators, and tools to use. You can type in the expression directly or use the controls to help you create it.</para>
        ///   <bulletList>
        ///     <bullet_item>The Rasters list identifies the datasets available to use in the Map Algebra expression.</bullet_item><para/>
        ///     <bullet_item>The Tools list provides a selection of commonly used tools to choose from.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要运行的映射代数表达式。</para>
        ///   <para>表达式是通过指定要使用的输入、值、运算符和工具组成的。您可以直接键入表达式，也可以使用控件来帮助您创建表达式。</para>
        ///   <bulletList>
        ///     <bullet_item>栅格列表用于标识可在地图代数表达式中使用的数据集。</bullet_item><para/>
        ///     <bullet_item>“工具”列表提供了一系列常用工具供您选择。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_output_raster">
        /// <para>Output raster</para>
        /// <para>The output raster resulting from the Map Algebra expression.</para>
        /// <para>由地图代数表达式生成的输出栅格。</para>
        /// </param>
        public RasterCalculator(object _expression, object _output_raster)
        {
            this._expression = _expression;
            this._output_raster = _output_raster;
        }
        public override string ToolboxName => "Image Analyst Tools";

        public override string ToolName => "Raster Calculator";

        public override string CallName => "ia.RasterCalculator";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_expression, _output_raster];

        /// <summary>
        /// <para>Map Algebra expression</para>
        /// <para><xdoc>
        ///   <para>The Map Algebra expression you want to run.</para>
        ///   <para>The expression is composed by specifying the inputs, values, operators, and tools to use. You can type in the expression directly or use the controls to help you create it.</para>
        ///   <bulletList>
        ///     <bullet_item>The Rasters list identifies the datasets available to use in the Map Algebra expression.</bullet_item><para/>
        ///     <bullet_item>The Tools list provides a selection of commonly used tools to choose from.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要运行的映射代数表达式。</para>
        ///   <para>表达式是通过指定要使用的输入、值、运算符和工具组成的。您可以直接键入表达式，也可以使用控件来帮助您创建表达式。</para>
        ///   <bulletList>
        ///     <bullet_item>栅格列表用于标识可在地图代数表达式中使用的数据集。</bullet_item><para/>
        ///     <bullet_item>“工具”列表提供了一系列常用工具供您选择。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Map Algebra expression")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _expression { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para>The output raster resulting from the Map Algebra expression.</para>
        /// <para>由地图代数表达式生成的输出栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_raster { get; set; }


        public RasterCalculator SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}